package org.heart.springsecurity.result;

/**
 * 一些声明信息 Description: <br>
 * date: 2021-11-26 22:58<br>
 *
 * @author laochen<br>
 * @since JDK 1.8
 */

public class ResultObj<T> {
    private Integer code;
    private String msg;
    private T data;

    public ResultObj() {
    }

    public ResultObj(Integer code) {
        this.code = code;
    }

    public ResultObj(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResultObj(Integer code, String msg) {
        this(code, msg, null);
    }

    public Integer getCode() {
        return code;
    }

    public ResultObj<T> setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public ResultObj<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public ResultObj<T> setData(T data) {
        this.data = data;
        return this;
    }
}
